<template>
	<view>
		<uv-popup ref="popup" mode="center" :safeAreaInsetBottom="false" round="15">
			<view class="content">
				<view class="inner_card">
					<view class="pricing">
						<text>未登录</text>
					</view>
					<view class="info">
						<view class="header">
							<text class="title">欢迎使用</text>
							<text class="sub_title">邻有福</text>
						</view>

						<view class="option">
							<view class="second">
								<uv-icon name="checkmark-circle-fill" color="#1fcac5"></uv-icon>
								<text>观看免费视频获取<text style="color: #425475;font-weight: 600;">早餐卷</text></text>
							</view>
							<view class="first">
								<uv-icon name="checkmark-circle-fill" color="#1fcac5"></uv-icon>
								<text>早餐券<text style="color: #425475;font-weight: 600;">全国通用</text></text>
							</view>
							<view class="thired">
								<uv-icon name="checkmark-circle-fill" color="#1fcac5"></uv-icon>
								<text>观看视频<text style="color: #425475;font-weight: 600;">获取积分</text></text>
							</view>
						</view>

						<view class="go_login_button" @click.stop="goLogin">
							<text>去登录</text>
						</view>
					</view>
				</view>
			</view>
		</uv-popup>
	</view>
</template>

<script>
	export default {
		name: "LoginPopup",
		data() {
			return {

			};
		},

		methods: {
			open() {
				this.$refs.popup.open();
			},
			goLogin() {
				uni.navigateTo({
					url: '/subpkg/login_page/login_page'
				}).then(() => {
					this.$refs.popup.close();
				});
			},
		},

		created() {
			uni.$on('NotLogin', () => {
				this.open()
			});
		},

		beforeDestroy() {
			uni.$off();
		}
	}
</script>

<style lang="scss" scoped>
	@import 'LoginPopup.scss';
</style>